package com.yq.skinlib.utils;


import com.yq.skinlib.manage.SkinCompatManager;

/**
 * desc:
 * author: xiedong
 * date: 3/16/21
 **/
public class SkinUtils {

    /**
     * 是否为本地皮肤包
     *
     * @param cname
     * @return
     */
    public static boolean isSkinLoadFromLocal(String cname) {
        return "red".equals(cname) || "night".equals(cname);
    }


    /**
     * 皮肤包加载策略
     *
     * @param cname
     * @return
     */
    public static int getSkinStrategy(String cname) {
        int strategy = 1;
        switch (cname) {
            case "red":
                strategy = SkinCompatManager.SKIN_LOADER_STRATEGY_NONE;
                break;
            case "night":
                strategy = SkinCompatManager.SKIN_LOADER_STRATEGY_PREFIX_BUILD_IN;
                break;
            default:
                strategy = SkinCompatManager.SKIN_LOADER_STRATEGY_BUILD_IN;
                break;
        }
        return strategy;
    }
}
